<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<tr:document xmlns="http://www.w3.org/1999/xhtml"
             xmlns:ui="http://java.sun.com/jsf/facelets"
             xmlns:h="http://java.sun.com/jsf/html"
             xmlns:f="http://java.sun.com/jsf/core"
             xmlns:c="http://java.sun.com/jstl/core"
             xmlns:fn="http://java.sun.com/jsp/jstl/functions"
             xmlns:mias="http://www.monsters.inc/mias"
             xmlns:tr="http://myfaces.apache.org/trinidad">
<!-- 
     Everything outside the ui:composition tag will be ignored by Facelets!
-->
<ui:composition>
  <!-- 
       Make sure the default value of autoComplete is "on" 
  -->  
  <c:if test="#{empty autoComplete}">
    <c:set var="autoComplete" value="on" />
  </c:if>
  
  <!-- 
       Make sure the default value of simple is "false" 
  -->  
  <c:if test="#{empty simple}">
    <c:set var="simple" value="false" />
  </c:if>
  
  <!--
       This is a work around for bug TRINIDAD-1390. 
   -->
  <c:if test="#{empty maximumLength}">
    <c:if test="#{columns gt 1}">
      <c:set var="maximumLength" value="2147483647" />
    </c:if>
  </c:if>
  
  <!-- 
       This is a work around for bug TRINIDAD-1417
   -->
  <c:if test="#{not empty partialTriggers}">
    <c:set var="partialTriggers" value="#{mias:getStringArray(partialTriggers)}" />
  </c:if>
  
  <tr:inputText value="#{bean[id]}" id="#{id}" required="#{required}" readOnly="#{readOnly}"
                label="#{msg[id]}:" secret="#{secret}" maximumLength="#{maximumLength}" columns="#{columns}"
                rows="#{rows}" wrap="#{wrap}" autoComplete="#{autoComplete}" simple="#{simple}" 
                partialTriggers="#{partialTriggers}" autoSubmit="#{autoSubmit}">
    <ui:insert/>
  </tr:inputText>

</ui:composition>
</tr:document>
